Field
Aspects of the present invention generally relate to a communication apparatus, a control method of the communication apparatus, and a storage medium.
Description of the Related Art
Wi-Fi Alliance has established a Wi-Fi Direct® standard. Wi-Fi Direct specifies a protocol for determining whether a communication apparatus, such as a printing apparatus or a personal computer (PC), operates as an access point or a client. Executing the protocol automatically determines a communication apparatus to be served as an access point, and a communication apparatus to be served as a client. Using Wi-Fi Direct allows communication apparatuses to directly perform wireless communication with each other without the need of separately preparing any access point.
FIG. 1 is a diagram illustrating a processing sequence of Wi-Fi Direct. A printing apparatus and a mobile terminal are exemplary information processing apparatuses that support Wi-Fi Direct, respectively.
In step S101, first, the printing apparatus and the mobile terminal perform a device search to specify their respective communication partners. In step S102, when they have specified their respective communication partners by the device search, they determine which one serves as an access point (GroupOwner) and which one serves as a client (Client). Hereinafter, such processing in step S102 is referred to as role determination. FIG. 1 illustrates an exemplary result of the role determination in step S102 in which the printing apparatus serves as GroupOwner and the mobile terminal serves as Client.
In step S103, subsequently, Wi-Fi Protected Setup (WPS) established by Wi-Fi Alliance is used to cause the printer apparatus and the mobile terminal to share parameters for making the printer apparatus (GroupOwner) accessible to the mobile terminal (Client). Then, in step S104, the printer apparatus and the mobile terminal are securely connected to each other. Until the processing in step S104 is completed, they communicate with each other as a data-link layer communication of an Open Systems Interconnection (OSI) reference model.
In step S105, when completing the secure connection, the printer apparatus and the mobile terminal perform addressing for internet protocol (IP) communication therebetween. In this case, the printing apparatus (GroupOwner) serves as a Dynamic Host Configuration Protocol (DHCP) server and provides the mobile terminal (Client) with an IP address. The processing in step S105 allows the printer apparatus and the mobile terminal to communicate with each other at a layer higher than a network layer of the OSI reference model.
By performing the above processing, the printer apparatus and the mobile terminal establish a wireless communication between them. Then, using the wireless communication makes the printer apparatus and the mobile terminal directly communicable with each other without preparing any additional access point. Japanese Patent Application Laid-Open No. 2012-199884 discusses transmission/reception of audio data or photography data using Wi-Fi Direct.
A communication apparatus can easily establish wireless communications with an external apparatus by Wi-Fi Direct. Then, the communication apparatus can utilize various services (for example, print service and storage service) using the wireless communication established by Wi-Fi Direct. However, if the external apparatus does not provide a user of the communication apparatus with any desired service, the communication apparatus has to search for a connection partner again. From the user's viewpoint, therefore, the user may have to repeat the procedures illustrated in FIG. 1 until he or she can utilize the desired service, and the repetition makes the user spend more time and labor.